package de.l3s.forgetit.services.resources;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import de.l3s.forgetit.services.schema.PIMOLog;

@Path("/cache/pimo")
@Produces("text/plain")
public class PIMOCacheResources {

	@GET
	@Path("/test-log")
	@Produces("application/json")
	public PIMOLog getExampleLog() {
		return PIMOLog.example();
	}
	
	@GET
	@Path("/test-mb")
	@Produces("application/json")
	public String getExampleLog(@QueryParam("res") String resource, @QueryParam("context") String context) {
		return "0.1";
	}
	
	@POST
	@Path("/put-log")
	@Consumes("application/json")
	@Produces("text/plain")
	public String putExampleLog(PIMOLog entry) {
		return "success";
	}
}
